<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>京城男人帮---提交订单</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/head.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/footer.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/go.css" />
	<script src="__PUBLIC__/home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div class="header">
		<!--顶部导航-->
        {include file="public/top_nav"}
        <!--顶部导航end-->
		<!--图片-->
		<div class="full_sc order_bottom">
			<div class="w1200 header_conter ">
				<div class="h_c_logo">
					<a href="{:url('home/index/index')}">
						<img src="__PUBLIC__/home/image/logo.png"  width="102px" height="98px" />
					</a>
				</div>
				<div class="h_c_right">
					<div class="order_Status os_oredr"></div>
				</div>
			</div>
		</div>
		<!--end-->
	</div>
	
	<div class="public_b">
		<form action="" method="post">
			<div class="w1200">
				<div class="h2">确认订单信息</div>
				<!--地址选择-->
				<div class="o_o_content">
					<h2 class="part_h2">
						1 地址选择
						<span class="addr_errtips">
							<i class="icon_err"></i>
							您好！此地址不在该商品配送区域范围内，请选择其他收货地址！
						</span>
					</h2>
					<div class="new_addr">
						<div class="ncc-form-default">
							<form action="" method="post" data-auto="true" >

								<input value="buy" name="act" type="hidden">
								<input value="add_addr" name="op" type="hidden">
								<input name="form_submit" value="ok" type="hidden">
								<dl>
									<dt><i class="required">*</i>收货人姓名：</dt>
									<dd>
										<input class="text w100" name="true_name" maxlength="20" id="true_name" value="" type="text">
									</dd>
								</dl>
								<dl>
									<dt><i class="required">*</i>所在地区：</dt>
									<?php if (!empty(1)){ ?>
										
									<?php } ?>
									<dd>
										<div id="region">
											<!-- 地址联动 -->
											<span class="label_n"><span class="c_red">*</span>所在地区：</span>
											<select class="city" name="country[]" id="statename">
												<option value="0">请选择地区</option>
												<?php foreach ($areaData as $key => $value): ?>
													<option value="<?php echo $value['area_id'] ?>"><?php echo $value['area_name'] ?></option>
												<?php endforeach ?>
											</select>
											<div class="addr_msg">
												<span id="error_statename"></span>
											</div>
											<!-- 地址联动 -->

											<input value="" name="city_id" id="city_id" type="hidden">
											<input name="area_id" id="area_id" class="area_ids" type="hidden">
											<input name="area_info" id="area_info" class="area_names" type="hidden">
											<input value="" name="statename_name" id="statename_name" type="hidden">
											<input value="" name="city_name" id="city_name" type="hidden">
											<input value="" name="county_name" id="county_name" type="hidden">
											<input value="" name="town_name" id="town_name" type="hidden">
											<input value="" name="transpzone_id" id="transpzone_id" type="hidden">
											<input value="" name="receiver_seq_id" id="receiver_seq_id" type="hidden">

										</div>
									</dd>
								</dl>
								<dl>
									<dt><i class="required">*</i>详细地址：</dt>
									<dd>
										<input class="text w500" name="address" id="address" maxlength="80" value="" type="text">
										<p class="hint">请填写真实地址，不需要重复填写所在地区</p>
									</dd>
								</dl>
								<dl>
									<dt> <i class="required">*</i>手机号码：</dt>
									<dd>
										<input class="text w200" name="mob_phone" id="mob_phone" maxlength="15" value="" type="text"> &nbsp;&nbsp;(或)&nbsp;固定电话： <input class="text w200" id="tel_phone" name="tel_phone" maxlength="20" value="" type="text">
									</dd>
								</dl>
								<div class="btn_item">
									<a href="javascript:;" class="btn_addaddr">确定</a>　
									<a href="javascript:;" class="btn_addaddr" onclick="submitAddList();">返回</a>
								</div>
							</form>
						</div>
					</div>
					<div style="display: none;" class="addr_list" id="addr_list">
						<ul>
							<li class="addr_new">
								<div class="btn_new_addr" nc_type="addr" id="add_addr">添加新地址</div>
							</li>
						</ul>
					</div>
					<!--支付方式-->
					<div class="o_o_part o_o_part2">
						<h2 class="part_h2">2 支付方式</h2>
						<div class="pay_type">
							<ul>
								<li class="on" payment_code="online">
									在线支付<b></b>
								</li>
								<li payment_code="offline">
									货到付款<b></b>
								</li>
							</ul>
						</div>
					</div>
					<!--支付方式-->
					<!--商品-->
					<div class="o_o_part o_o_part3">
						<h2 class="part_h2">3&nbsp;商品清单<a class="a_return_car" href="{:url('home/cart/submit')}"> &lt; 返回购物车</a></h2>
						<div class="oder_shop">
							<!--shoptitle-->
							<div class="shop_tit">
								<div class="cart_checkbox">
									<span>商品名称</span>
								</div>
								<div class="column cart_standard">规格</div>
								<div class="column t_price">单价(元)</div>
								<div class="column t_quantity">数量</div>
								<div class="column t_sum">小计(元)</div>
							</div>
							<!--shoptitle-->
							<!--shoplist-->
							<div class="item_list">
							<?php if (!empty($cartData)){ ?>
								<?php foreach ($cartData as $key => $value){ ?>
								<div class="item_form">
									<div class="cell p_checkbox"></div>
									<div class="cell p_goods">
										<div class="goods_item">
											<div class="p_imgs">
												<a target="_blank" href="">
													<img src="__PUBLIC__/<?php echo $value['g_img'] ?>" alt="<?php echo $value['g_name'] ?>" width="60px" height="60px"></a>
											</div>
											<div class="item_msg">
												<div class="p_border_bottom">
													<div class="p_name">
														<a target="_blank" href="http://www.happigo.com/item-0-174196.html"><?php echo $value['g_name'] ?></a>
													</div>
												</div>
											</div>
										</div>
									</div>
									<div class="cell p_standard">
										<p class="p_g_standard p_border_bottom"></p>
									</div>
									<div class="cell p_price p_border_bottom">
										<p class="p_prices2"><?php echo $value['g_price'] ?></p>
									</div>
									<div class="cell p_quantity">
										<div class="quantity_form p_border_bottom">x<?php echo $value['s_num'] ?></div>
									</div>
									<div class="cell p_sum p_border_bottom">
										<strong>199.00</strong>
									</div>
								</div>
								<?php } ?>
							<?php } ?>
							</div>
							<!--shoplist-->
							<!--优惠卷-->
							<!-- <div class="border_b">
								<div class="user_jf_yhj">
									<div class="user_jf_yhj_t">
										<b>-</b>使用积分和优惠券
									</div>
								</div>
								<div class="use_jf_yhj_c">
									<div class="order_items">
										<div class="yhj_show">使用优惠券：</div>
										<select name="">
                                            <option value="0">----不使用----</option>
                                            <option value="5285942">5(188元新人套券-5元)</option>
                                            <option value="5285943">10(188元新人套券-10元)</option>
                                            <option value="5285944">20(188元新人套券-20元)</option>
                                       </select>
									</div>
								</div>
							</div> -->
							<!--优惠卷-->
							<!--结算-->
							<div class="yhxx_box">
								<ul class="yhxx_list">
									<li>
										<div class="yhxx_tit">商品总额<span class="yhxx_money">￥<span>199</span> </span>
										</div>
									</li>
									<me id="paypromotion"></me>
									<me id="paypromotion_info"></me>
									<!-- <li>
										<div class="yhxx_tit">优惠券<span class="yhxx_money"><span class="s_jian">-</span>￥<span id="voucher_price">0</span> </span>
										</div>
									</li> -->
									<li class="margin_top10">
										<div class="yhxx_tit">本单应付 <span class="yhxx_money">￥<span class="s_sum s_order_money">199</span> </span>
										</div>
									</li>
								</ul>
							</div>
							<!--结算-->
							<!--发票-->
							<div class="ask_bill">
								<p>
									<label class="lab_bill">
                                        <input name="fapiao" value="1" checked="" type="checkbox">
                                        <span>索要发票</span>
                                   </label>
								</p>
								<ul class="ask_bill_ul">
									<li fapiao_type="电子发票" class="on">电子发票<b></b></li>
									<li fapiao_type="普通发票">普通发票<b></b></li>
								</ul>
								<p class="bill_c">
									发票抬头：
									<label class="lab_bill p_r_30">
                                        <input name="invoice" value="1" checked="checked" type="radio"><span>个人</span>
                                    </label>
									<label class="lab_bill">
                                        <input name="invoice" value="2" type="radio"><span>单位</span>
                                    </label>
								</p>
								<div class="bill_c bill_unit" style="display:none;">
									<p>
										<span class="bill_c_name">单位名称：  </span>
										<input class="bill_itxt" name="fapiao_danwei" type="text">
									</p>
									<p class="bill_tips">温馨提示：您填写的内容将被系统自动打印到发票上，请勿填写发票抬头无关的信息.</p>
								</div>
							</div>
							<!--发票-->
							<div class="btnsure_bg">
								<div class="sureorder">
									<div class="jine">应付总额：<span class="fwxh_30">￥</span><span class="span_m s_order_money">199</span></div>
									<a class="un_btn_sure" id="btn_sure" href="javascript:void(0);">提交订单</a>
								</div>
							</div>
						</div>
					</div>
					<!--商品-->
				</div>
				<!--地址选择end-->
			</div>
		</form>
	</div>

   	<!--底部公用-->
    {include file="public/footer"}
    <!--底部end-->
</body>
</html>
<script >
	$(function(){
		//添加一个点击事件  支付方式
		$(".pay_type ul li").click(function(){
			var n = $(this).index();
			//切换颜色 
			$(".pay_type ul li").eq(n).addClass("on").siblings().removeClass("on");
		})
		//添加一个点击事件  发票
		$(".ask_bill ul li").click(function(){
			var n = $(this).index();
			//切换颜色
			$(".ask_bill ul li").eq(n).addClass("on").siblings().removeClass("on");
		})
	})

	// 绑定地区联动事件
	$(document).on("change",".city",function(){
		var area_id = $(this).val();
		var _this = $(this);
		$.ajax({
			url:"submitpath",
			data:{area_id:area_id},
			dataType:"json",
			success:function(res){
				if(area_id>0){
					if(res.areaData.length>0){
						var select = '<select class="city" name="country[]" id="statename">';
						select +='<option value="0">请选择地区</option>';
						$.each(res.areaData,function(i,v){
							select += '<option value="'+v.area_id+'">'+v.area_name+'</option>';
						})
						select +='</select>';
						_this.nextAll('.region select').remove();
						_this.after(select);
					}
				}else{
					_this.nextAll('.region select').remove();
				}
			}
		})
	})
</script>